package com.nidu.demo.user.dto;

import com.nidu.demo.base.BaseTenantCO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "用户个人中心客户端对象")
public class UserProfileCO extends BaseTenantCO {

    /**
     * 主键ID
     */
    @Schema(description = "主键ID", example = "主键ID")
    private Long id;

    /**
     * 用户名
     */
    @Schema(description = "用户名", example = "admin")
    private String username;

    /**
     * 昵称
     */
    @Schema(description = "昵称", example = "管理员")
    private String nickname;

    /**
     * 邮箱
     */
    @Schema(description = "邮箱", example = "admin@example.com")
    private String email;

    /**
     * 手机号
     */
    @Schema(description = "手机号", example = "13800138000")
    private String mobile;

    /**
     * 头像
     */
    @Schema(description = "头像")
    private String avatar;

    /**
     * 性别
     */
    @Schema(description = "性别")
    private Integer gender;

    /**
     * 公司对象
     */
    private Long companyId;

    /**
     * 所属角色
     */
    private List<Long> roleIds;

    /**
     * 所属角色
     */
    private List<Long> deptIds;

    /**
     * 所属岗位数组
     */
    private List<Long> postIds;

    public void setProfile(List<Long> roleIds, List<Long> deptIds, List<Long> postIds) {
        this.setRoleIds(roleIds);
        this.setDeptIds(deptIds);
        this.setPostIds(postIds);
    }
}
